<template>
  <div>
    <div class="goodslist">
      <div class="goods" v-for="(item, index) in iteminfo" :key="index">
        <div class="left_img">
          <img v-lazy="item.imgUrl" alt="" />
        </div>
        <div class="right_info">
          <div class="desc">
            {{ item.desc }}
          </div>
          <div class="right_detail">
            <div class="price">
              {{ item.price | showPrice }}
            </div>
            <div class="store">
              {{ item.store }}
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["iteminfo"],
  filters: {
    showPrice(price) {
      return "￥" + parseFloat(price).toFixed(2);
    },
  },
};
</script>

<style lang="less" scoped>
.goodslist {
  text-align: left;
  background-color: #fff;
  margin-top: 2px;
  .goods {
    display: flex;
    .left_img {
      margin: 35px 0 0 34px;
      img {
        width: 170px;
        height: 185px;
        vertical-align: middle;
        text-align: left;
      }
    }
    .right_info {
      margin-left: 27px;
      flex: 1;
      .desc {
        margin-top: 40px;
        width: 395px;
        letter-spacing: 1px;
        font-size: 24px;
      }
      .right_detail {
        display: flex;
        margin-top: 84px;
        justify-content: space-between;
        .store {
          margin-right: 19px;
          color: #999999;
          font-size: 18px;
        }
        .price {
          color: #cc3333;
          font-size: 18px;
        }
      }
    }
  }
}
</style>